package cn.kgc.tangcco.tcbd1011.booktype.services.impl;

import java.util.List;

import cn.kgc.tangcco.tcbd1011.books.dao.BooksDao;
import cn.kgc.tangcco.tcbd1011.books.entity.Books;
import cn.kgc.tangcco.tcbd1011.booktype.dao.BookTypeDao;
import cn.kgc.tangcco.tcbd1011.booktype.entity.BookType;
import cn.kgc.tangcco.tcbd1011.booktype.services.BookTypeService;
import cn.kgc.tangcco.tcbd1011.comm.properties.PropertiesFactory;
import cn.kgc.tangcco.tcbd1011.util.Util;

public class BookTypeServiceImpl implements BookTypeService{
	private BookTypeDao bdao=(BookTypeDao) PropertiesFactory.getInstance(Util.BOOKTYPEDAO);
	private BooksDao booksdao=(BooksDao) PropertiesFactory.getInstance(Util.BOOKSDAO);
	@Override
	public int addBookType(BookType bookType) {
		return bdao.addBookType(bookType);
	}

	@Override
	public int updateBookType(BookType bookType) {
		return bdao.updateBookType(bookType);
	}

	@Override
	public int deleteBookType(int pk) {
		return bdao.deleteBookType(pk);
	}

	@Override
	public BookType detailBookTypeById(int pk) {
		return bdao.detailBookTypeById(pk);
	}

	@Override
	public List<BookType> queryAllBook() {
		return bdao.queryAllBook();
	}

	@Override
	public List<Books> queryTypeToBooks() {
		return booksdao.queryTypeToBooks();
	}
	
}
